﻿import FightModuleC from "./Fight/FightModuleC";
import FightModuleS from "./Fight/FightModuleS";
import GameModuleC from "./GameModule/GameModuleC";
import GameModuleData from "./GameModule/GameModuleData";
import GameModuleS from "./GameModule/GameModuleS";
import MatchControlModuleS from "./MatchControl/MatchControlModuleS";
import MatchControlModuleC from "./MatchControl/MatchControllModuleC";

@Component
export default class GameStart extends Script {

    /** 当脚本被实例后，会在第一帧更新前调用此函数 */
    protected onStart(): void {
        ModuleService.registerModule(GameModuleS, GameModuleC, GameModuleData);
        ModuleService.registerModule(MatchControlModuleS, MatchControlModuleC, null);
        ModuleService.registerModule(FightModuleS, FightModuleC, null);
        console.log();
        if (SystemUtil.isServer()) {
            DataStorage.setTemporaryStorage(SystemUtil.isPIE)
        }
        this.useUpdate = true;
    }

    protected onUpdate(dt: number): void {
        TweenUtil.TWEEN.update();
    }
}